// Include files.
#include "ArcadeModernDriveFilter.hpp"

/**
 *  Apply the filter to an input.
 */
CartesianValue ArcadeModernDriveFilter::Apply(const TwoJoystickValue &input) const
{
	/* The following code in this block is derived from 
	 * WPILib, which is licenced under the licence specified
	 * in "Licence-WPILib.txt".
	 */
	
	double x = input.GetLeftValue().GetX();
	double y = -input.GetLeftValue().GetY();
	double rotation = input.GetRightValue().GetX();
	
	return CartesianValue(x, y, rotation);
}
